Average Case Analysis of Heap Building by Repeated Insertion
نویسندگان
چکیده
An array A[1], . . . , A[n] is a (min) heap if A[⌊i/2⌋] ≤ A[i], for i = 2, . . . , n. The heap is a much used and much studied data structure (for example, see Knuth [K]). Williams’ method for constructing a heap involves repeatedly inserting a key at the bottom of the heap and ’bubbling’ it up. This method requires Θ(n logn) time in the worst case. Let Wn denote the number of ’swaps’ (or ’promotions’) performed in the building of a heap with n keys (see Appendix 1 for a precise definition). We make the usual assumption that each initial permutation of the keys is equally likely. It is shown by Bollobás and Simon [BS] and Frieze [F] that for perfect heaps (that is, for n equal to 2k−1) the expected number E[Wn]
منابع مشابه
Stability Analysis and Stabilization of Miduk Heap Leaching Structure, Iran
To construct copper heap leaching structures, a stepped heap of ore is placed over an isolated sloping surface and then washed with sulphuric acid. The isolated bed of such a heap consists of some natural and geosynthetic layers. Shear strength parameters between these layers are low, so they form the possible sliding surfaces of the heaps. Economic and environmental considerations call for stu...
متن کاملHeap Building Bounds
We consider the lower bound for building a heap in the worst case and the upper bound in the average case. We will prove that the supposedly fastest algorithm in the average case[2] does not attain its claimed bound and indeed is slower than that in [6]. We will then prove that the adversarial argument for the claimed best lower bound in the worst case[1] is also incorrect and the adversarial a...
متن کاملA New Analytical Solution for Determination of Acceptable Overall settlement of Heap Leaching Structures Foundation
There are some artificial and natural materials on foundation of heap leaching structures. Geomembrane liner is the most important artificial isolated layer of these structures. The thickness of this layer is about 1 to 2 mm. Foundation overall settlement of such structures changes the primary length of the geomembrane layer. If the strain of geomembrane is more than allowable one, the layer wi...
متن کاملHeap building bounds
We have considered the uppper and lower bounds for building heaps in the worst and average cases. Heaps are binary tree for which all its levels are full except the last one. The nodes on the last level are all as much to the left as possible. A max-heap has the property that every node has value greater or equal to that of its children. We have studied the contruction of heaps in the compariso...
متن کاملOn the Power of Structural Violations in Priority Queues
We give a priority queue that guarantees the worstcase cost of Θ(1) per minimum finding, insertion, and decrease; and the worst-case cost of Θ(lg n) with at most lg n + O( √ lg n) element comparisons per deletion. Here, n denotes the number of elements stored in the data structure prior to the operation in question, and lg n is a shorthand for max {1, log2 n}. In contrast to a run-relaxed heap,...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Algorithms
دوره 12 شماره
صفحات -
تاریخ انتشار 1991